<template>
  <div class="page-wrapper">
    <div style="height: 70px;background-color: black"></div>
    <div class="page-banner-content">
      <el-carousel :interval="4000" height="400px">
        <el-carousel-item v-for="(item,index) in bannerList" :key="index">
          <el-image :src="item" fit="fit"></el-image>
        </el-carousel-item>
      </el-carousel>
    </div>
    <!--Axure 绘制原型图工具-->
    <div class="page-axure">
      <div class="page-axure-title">Axure RP 工具使用</div>
      <div class="page-axure-content">
        <div class="image-one">
          <el-image :src="require('../../assets/images/page/ic_axure_one.jpg')" :preview-src-list="axureList"/>
        </div>
        <div class="image-two">
          <el-image :src="require('../../assets/images/page/ic_axure_two.jpg')" :preview-src-list="axureList"/>
        </div>
        <div class="image-three">
          <el-image :src="require('../../assets/images/page/ic_axure_three.jpg')" :preview-src-list="axureList"/>
        </div>
      </div>
    </div>

    <!--比较重要项目-->
    <div class="page-project">
      <div class="page-project-title">个人相关项目</div>
      <div class="item-project" v-for="(item,index) of projectList" :key="index"
           :style="index%2===0?'background:black':''">
        <div class="project-header">
          <span class="project-type">{{item.type}}</span>
          <span class="project-name">{{item.name}}</span>
        </div>

        <div class="project-images" v-for="(imageItem,imageIndex) of item.images" :key="imageIndex">
          <el-image v-if="imageIndex<3" style="width: 32%;float: left;margin-left: 1%" :src="imageItem"
                    :fit="cover"
                    :preview-src-list="item.images"/>
        </div>
        <div class="project-introduce">
          项目简介：{{item.introduce}}
        </div>
      </div>

    </div>

  </div>
</template>

<script>
  export default {
    name: 'Index',
    data () {
      return {
        bannerList: [
          require('../../assets/images/page/ic_page_banner.jpg'),
          'https://pic.vjshi.com/2019-02-19/a86e6a310f4d2f5a3352d876303040bc/00001.jpg?x-oss-process=style/watermark',
          'https://img95.699pic.com/photo/40160/6974.jpg_wh860.jpg'
        ],
        axureList: [
          require('../../assets/images/page/ic_axure_one.jpg'),
          require('../../assets/images/page/ic_axure_two.jpg'),
          require('../../assets/images/page/ic_axure_three.jpg')
        ],
        projectList: [
          {
            name: '数治综保',
            type: 'Android',
            introduce: '项目简介',
            images: [
              require('../../assets/images/page/ic_axure_one.jpg'),
              require('../../assets/images/page/ic_axure_one.jpg'),
              require('../../assets/images/page/ic_axure_one.jpg'),
              require('../../assets/images/page/ic_axure_one.jpg'),
              require('../../assets/images/page/ic_axure_one.jpg'),
            ]
          }, {
            name: '数治综保1',
            type: 'Android',
            introduce: '项目简介',
            images: [
              require('../../assets/images/page/ic_axure_one.jpg'),
              require('../../assets/images/page/ic_axure_one.jpg'),
            ]
          }, {
            name: '数治综保2',
            type: 'VUE',
            introduce: '项目简介',
            images: [
              require('../../assets/images/page/ic_axure_one.jpg'),
              require('../../assets/images/page/ic_axure_one.jpg'),
            ]
          },

        ]
      }
    }
  }
</script>

<style scoped ref="stylesheet/scss" lang="scss">
  .page-wrapper {
    width: 100%;
    height: 100%;

    .page-banner-content {
      width: 100%;
      height: 420px;
      /*
            img {
              width: 100%;
              height: 100%;
            }*/

      .el-carousel__item {
        color: #475669;
        font-size: 18px;
        margin: 0;
        .item-content {

          img {
            object-fit: cover;
            width: 100%;
            height: 500px;
          }

          span {
            left: 20px;
            font-weight: bold;
            bottom: 20px;
            font-size: 24px;
            color: white;
            position: absolute;
          }
        }
      }

      .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
      }

      .el-carousel__item:nth-child(2n+1) {
        background-color: #d3dce6;
      }
    }

    .page-axure {
      height: 410px;
      width: 100%;
      padding: 0 4%;

      .page-axure-title {
        font-weight: bold;
        color: white;
        line-height: 50px;
        font-size: 24px;
      }
      .page-axure-content {
        height: 340px;
        width: 100%;
        // padding: 0 0.5%;
        .image-one {
          float: left;
          height: 100%;
          width: 30%;
          .el-image {
            width: 100%;
            height: 100%;
          }
        }
        .image-two {
          height: 100%;
          margin-left: 5%;
          float: left;
          width: 30%;
          .el-image {
            width: 100%;
            height: 100%;
          }
        }
        .image-three {
          float: right;
          width: 30%;
          height: 100%;
          .el-image {
            width: 100%;
            height: 100%;
          }
        }

      }
    }

    .page-project {
      width: 100%;

      .page-project-title {
        font-weight: bold;
        color: white;
        line-height: 50px;
        font-size: 24px;
        clear: both;
      }
      .item-project {
        background-color: rgba(29, 30, 31, 1);
        border-radius: 20px;
        padding: 10px;
        clear: both;
        box-shadow: 4px 4px 10px #15C3A3;
        margin: 25px 10%;

        .project-header {
          line-height: 50px;
          text-align: left;
          .project-type {
            font-size: 12px;
            padding: 6px 10px;
            border-radius: 5px;
            color: white;
            background-color: #15C3A3;
          }

          .project-name {
            margin-left: 10px;
            font-size: 20px;
            color: white;
            font-weight: bold;
          }

        }

        .project-images {

        }

        .project-introduce {
          padding-top: 10px;
          clear: both;
          line-height: 20px;
          color: white;
          text-align: left;
          padding-bottom: 10px;
        }

      }

    }

  }
</style>
